home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
shore-siege.swf
/
scripts
/
DefineSprite_244_Upgrader
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
2KB
|
102 lines
function onEnterFrame()
{
dTimer--;
if(dTimer == 0)
{
dTimer = 30;
_parent.mouseMC.swapDepths(_parent.getNextHighestDepth() + 20);
}
_parent.mouseMC.gotoAndStop(1);
SHIP.gotoAndStop(_root.shipRepair);
_parent.SHIP.gotoAndStop(_root.shipRepair);
SHIP.cannon._visible = _parent.SHIP.cannon._visible;
repairsLeft = 11 - _root.shipRepair + " REPAIRS";
covers();
}
function covers()
{
if(cover_BP._x > 0)
{
cover_BP._x -= 10000;
}
cover_BP.stop();
if(cover_UP._x > 0)
{
cover_UP._x -= 10000;
}
cover_UP.stop();
if(cover_RT._x > 0)
{
cover_RT._x -= 10000;
}
cover_RT.stop();
if(cover_RA._x > 0)
{
cover_RA._x -= 10000;
}
cover_RA.stop();
if(cover_UN._x > 0)
{
cover_UN._x -= 10000;
}
cover_UN.stop();
if(cover_UF._x > 0)
{
cover_UF._x -= 10000;
}
cover_UF.stop();
if(cover_UD._x > 0)
{
cover_UD._x -= 10000;
}
cover_UD.stop();
if(cover_HM._x > 0)
{
cover_HM._x -= 10000;
}
cover_HM.stop();
if(cover_RS._x > 0)
{
cover_RS._x -= 10000;
}
cover_RS.stop();
if(_root.money < 4000 || _root.pirateActive > 3)
{
cover_BP._x += 10000;
}
if(_root.money < 1000 || _root.pirateTrain > 90 || _root.pirateActive == 0)
{
cover_UP._x += 10000;
}
if(_root.money < 2000 || _root.turretActive == true)
{
cover_RT._x += 10000;
}
if(_root.money < 2000 || SHIP.cannon._visible == true)
{
cover_RA._x += 10000;
}
if(_root.money < 4000 || _root.nailUpgrade == 2)
{
cover_UN._x += 10000;
}
if(_root.money < 2000 || _root.dropUpgrade == 0 || _root.dropUpgrade == 2)
{
cover_UD._x += 10000;
}
if(_root.money < 2000 || _root.flameUpgrade == 0 || _root.flameUpgrade == 2)
{
cover_UF._x += 10000;
}
if(_root.money < 1000 || _root.maxHealth > 190)
{
cover_HM._x += 10000;
}
if(_root.money < 5000)
{
cover_RS._x += 10000;
}
}
stop();
dTimer = 30;